package com.kkb.robotcustomerservice.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kkb.robotcustomerservice.entities.KnowledgeBase;
import com.kkb.robotcustomerservice.util.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface KnowledgeBaseDao extends BaseMapper<KnowledgeBase> {

    List<KnowledgeBase> selectByPage(@Param("user") User user);

    @Delete("delete from knowledge_base where create_user=#{createUser} and create_sort=#{createSort}")
    public Integer deleteAll(@Param("createUser") String createUser,@Param("createSort") String createSort);

    int insertList(List<KnowledgeBase> list,User user);
}
